package com.sharecode.stock.vo.stock;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import com.opencsv.bean.CsvBindByName;

import lombok.Data;

@Data
@Entity
public class StockHistory implements Serializable {
	/**
		 * 
		 */
	private static final long serialVersionUID = 1L;

//	日期	股票代码	名称	收盘价	最高价	最低价	开盘价	前收盘	涨跌额	涨跌幅	换手率	成交量	成交金额	总市值	流通市值	成交笔数

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	@CsvBindByName(column = "股票代码", required = true)
	private String code;

	@CsvBindByName(column = "日期", required = true)
	private String date;

	@CsvBindByName(column = "收盘价", required = true)
	private BigDecimal close;

	@CsvBindByName(column = "最高价", required = true)
	private BigDecimal high;

	@CsvBindByName(column = "最低价", required = true)
	private BigDecimal low;

	@CsvBindByName(column = "开盘价", required = true)
	private BigDecimal open;

	@CsvBindByName(column = "成交量", required = true)
	private BigDecimal volume;// 成交量

	@CsvBindByName(column = "总市值", required = true)
	private BigDecimal market;// 总市值

	private int cycle = 1;// 周期

}
